Optimal. Leaf size=122 \[ -\frac {d (c+d x)}{2 f^2 (a \coth (e+f x)+a)}-\frac {(c+d x)^2}{2 f (a \coth (e+f x)+a)}+\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d^2}{4 f^3 (a \coth (e+f x)+a)}+\frac {d^2 x}{4 a f^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {3723, 3479, 8} \[ -\frac {d (c+d x)}{2 f^2 (a \coth (e+f x)+a)}-\frac {(c+d x)^2}{2 f (a \coth (e+f x)+a)}+\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d^2}{4 f^3 (a \coth (e+f x)+a)}+\frac {d^2 x}{4 a f^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3479
Rule 3723
Rubi steps
\begin {align*} \int \frac {(c+d x)^2}{a+a \coth (e+f x)} \, dx &=\frac {(c+d x)^3}{6 a d}-\frac {(c+d x)^2}{2 f (a+a \coth (e+f x))}+\frac {d \int \frac {c+d x}{a+a \coth (e+f x)} \, dx}{f}\\ &=\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d (c+d x)}{2 f^2 (a+a \coth (e+f x))}-\frac {(c+d x)^2}{2 f (a+a \coth (e+f x))}+\frac {d^2 \int \frac {1}{a+a \coth (e+f x)} \, dx}{2 f^2}\\ &=\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d^2}{4 f^3 (a+a \coth (e+f x))}-\frac {d (c+d x)}{2 f^2 (a+a \coth (e+f x))}-\frac {(c+d x)^2}{2 f (a+a \coth (e+f x))}+\frac {d^2 \int 1 \, dx}{4 a f^2}\\ &=\frac {d^2 x}{4 a f^2}+\frac {(c+d x)^2}{4 a f}+\frac {(c+d x)^3}{6 a d}-\frac {d^2}{4 f^3 (a+a \coth (e+f x))}-\frac {d (c+d x)}{2 f^2 (a+a \coth (e+f x))}-\frac {(c+d x)^2}{2 f (a+a \coth (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.28, size = 169, normalized size = 1.39 \[ \frac {\text {csch}(e+f x) (\sinh (f x)+\cosh (f x)) \left (\frac {4}{3} f^3 x \left (3 c^2+3 c d x+d^2 x^2\right ) (\sinh (e)+\cosh (e))+(\cosh (e)-\sinh (e)) \cosh (2 f x) \left (2 c^2 f^2+2 c d f (2 f x+1)+d^2 \left (2 f^2 x^2+2 f x+1\right )\right )+(\sinh (e)-\cosh (e)) \sinh (2 f x) \left (2 c^2 f^2+2 c d f (2 f x+1)+d^2 \left (2 f^2 x^2+2 f x+1\right )\right )\right )}{8 a f^3 (\coth (e+f x)+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.41, size = 192, normalized size = 1.57 \[ \frac {{\left (4 \, d^{2} f^{3} x^{3} + 6 \, c^{2} f^{2} + 6 \, c d f + 6 \, {\left (2 \, c d f^{3} + d^{2} f^{2}\right )} x^{2} + 3 \, d^{2} + 6 \, {\left (2 \, c^{2} f^{3} + 2 \, c d f^{2} + d^{2} f\right )} x\right )} \cosh \left (f x + e\right ) + {\left (4 \, d^{2} f^{3} x^{3} - 6 \, c^{2} f^{2} - 6 \, c d f + 6 \, {\left (2 \, c d f^{3} - d^{2} f^{2}\right )} x^{2} - 3 \, d^{2} + 6 \, {\left (2 \, c^{2} f^{3} - 2 \, c d f^{2} - d^{2} f\right )} x\right )} \sinh \left (f x + e\right )}{24 \, {\left (a f^{3} \cosh \left (f x + e\right ) + a f^{3} \sinh \left (f x + e\right )\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.12, size = 123, normalized size = 1.01 \[ \frac {{\left (4 \, d^{2} f^{3} x^{3} e^{\left (2 \, f x + 2 \, e\right )} + 12 \, c d f^{3} x^{2} e^{\left (2 \, f x + 2 \, e\right )} + 12 \, c^{2} f^{3} x e^{\left (2 \, f x + 2 \, e\right )} + 6 \, d^{2} f^{2} x^{2} + 12 \, c d f^{2} x + 6 \, c^{2} f^{2} + 6 \, d^{2} f x + 6 \, c d f + 3 \, d^{2}\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{24 \, a f^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.39, size = 469, normalized size = 3.84 \[ \frac {-\frac {d^{2} \left (\frac {\left (f x +e \right )^{2} \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{3}}{6}-\frac {\left (f x +e \right ) \left (\cosh ^{2}\left (f x +e \right )\right )}{2}+\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}+\frac {f x}{4}+\frac {e}{4}\right )}{f^{2}}+\frac {d^{2} \left (\frac {\left (f x +e \right )^{2} \left (\cosh ^{2}\left (f x +e \right )\right )}{2}-\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}+\frac {\left (\cosh ^{2}\left (f x +e \right )\right )}{4}\right )}{f^{2}}+\frac {2 d^{2} e \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\left (\cosh ^{2}\left (f x +e \right )\right )}{4}\right )}{f^{2}}-\frac {2 d^{2} e \left (\frac {\left (f x +e \right ) \left (\cosh ^{2}\left (f x +e \right )\right )}{2}-\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}-\frac {f x}{4}-\frac {e}{4}\right )}{f^{2}}-\frac {2 d c \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\left (\cosh ^{2}\left (f x +e \right )\right )}{4}\right )}{f}+\frac {2 d c \left (\frac {\left (f x +e \right ) \left (\cosh ^{2}\left (f x +e \right )\right )}{2}-\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{4}-\frac {f x}{4}-\frac {e}{4}\right )}{f}-\frac {d^{2} e^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f^{2}}+\frac {d^{2} e^{2} \left (\cosh ^{2}\left (f x +e \right )\right )}{2 f^{2}}+\frac {2 d e c \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}-\frac {d e c \left (\cosh ^{2}\left (f x +e \right )\right )}{f}-c^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )+\frac {c^{2} \left (\cosh ^{2}\left (f x +e \right )\right )}{2}}{a f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.41, size = 124, normalized size = 1.02 \[ \frac {1}{4} \, c^{2} {\left (\frac {2 \, {\left (f x + e\right )}}{a f} + \frac {e^{\left (-2 \, f x - 2 \, e\right )}}{a f}\right )} + \frac {{\left (2 \, f^{2} x^{2} e^{\left (2 \, e\right )} + {\left (2 \, f x + 1\right )} e^{\left (-2 \, f x\right )}\right )} c d e^{\left (-2 \, e\right )}}{4 \, a f^{2}} + \frac {{\left (4 \, f^{3} x^{3} e^{\left (2 \, e\right )} + 3 \, {\left (2 \, f^{2} x^{2} + 2 \, f x + 1\right )} e^{\left (-2 \, f x\right )}\right )} d^{2} e^{\left (-2 \, e\right )}}{24 \, a f^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.30, size = 186, normalized size = 1.52 \[ \frac {{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (12\,c^2\,x\,{\mathrm {e}}^{2\,e+2\,f\,x}+4\,d^2\,x^3\,{\mathrm {e}}^{2\,e+2\,f\,x}+12\,c\,d\,x^2\,{\mathrm {e}}^{2\,e+2\,f\,x}\right )}{24\,a}+\frac {\frac {{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (3\,d^2+3\,d^2\,{\mathrm {e}}^{2\,e+2\,f\,x}\right )}{24}+\frac {f\,{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (6\,c\,d+6\,d^2\,x+6\,c\,d\,{\mathrm {e}}^{2\,e+2\,f\,x}\right )}{24}+\frac {f^2\,{\mathrm {e}}^{-2\,e-2\,f\,x}\,\left (6\,c^2+6\,c^2\,{\mathrm {e}}^{2\,e+2\,f\,x}+6\,d^2\,x^2+12\,c\,d\,x\right )}{24}}{a\,f^3} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.25, size = 522, normalized size = 4.28 \[ \begin {cases} \frac {6 c^{2} f^{3} x \tanh {\left (e + f x \right )}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {6 c^{2} f^{3} x}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {6 c^{2} f^{2}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {6 c d f^{3} x^{2} \tanh {\left (e + f x \right )}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {6 c d f^{3} x^{2}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} - \frac {6 c d f^{2} x \tanh {\left (e + f x \right )}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {6 c d f^{2} x}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {6 c d f}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {2 d^{2} f^{3} x^{3} \tanh {\left (e + f x \right )}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {2 d^{2} f^{3} x^{3}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} - \frac {3 d^{2} f^{2} x^{2} \tanh {\left (e + f x \right )}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {3 d^{2} f^{2} x^{2}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} - \frac {3 d^{2} f x \tanh {\left (e + f x \right )}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {3 d^{2} f x}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} + \frac {3 d^{2}}{12 a f^{3} \tanh {\left (e + f x \right )} + 12 a f^{3}} & \text {for}\: f \neq 0 \\\frac {c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}}{a \coth {\relax (e )} + a} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________